package com.example.web.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: springsecurity-study
 * @description: 测试的demo
 * @author: ChenZhiXiang
 * @create: 2019-07-25 21:10
 **/
@RestController
public class DemoController {

    @GetMapping("/")
    public Object get(){
        return "hello";
    }

    @GetMapping("/add")
    public Object add(@RequestParam String name){
        return name;
    }

    @PostMapping("/add")
    public Object addPost(@RequestParam String name){
        return name;
    }

    @GetMapping("/a")
    public Object a(){
        return "a";
    }
}
